<template>
  <div>
    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-row>
          <el-col :span="24">
            <el-form-item label="地址" prop="dz">
              <el-input size="mini" v-model="form.dz" placeholder="请输入地址" />
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="租金" prop="zj">
              <el-input size="mini" v-model="form.zj" placeholder="请输入租金" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm" size="mini">确 定</el-button>
        <el-button @click="cancel" size="mini">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      title: '',
      open: false,
      form: {
        dz: '',
        zj: ""
      },
      rules: {}
    }
  },
  methods: {
    init() {
      this.title = '修改租金';
      this.open = true;
    },
    rest() {
      this.form = {}
      this.resetForm("form");
    },
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {


        }
      });
    },
    cancel() {
      this.open = false;
      this.rest()
    }
  }
}
</script>

<style>
</style>